﻿<UserControl x:Class="Matchingo.Silverlight.Shell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d"
    Width="360" Height="430" >

    <!-- root window element -->
    <Grid x:Name="RootElement">
        
        <!-- NOTE:: global scaler, may be used with fullscreen work -->
        <!--
        <Grid.RenderTransform>
            <ScaleTransform ScaleX="1.25" ScaleY="1.25" />
        </Grid.RenderTransform>
        -->
        
        <ItemsControl Regions:RegionManager.RegionName="Region_Background" /> 
        <Grid> 
          
            <!-- main regions / layers -->
            <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                
                <ItemsControl Regions:RegionManager.RegionName="OverlayRegion_Particles" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                <ItemsControl Regions:RegionManager.RegionName="Region_Main" />
                <ItemsControl Regions:RegionManager.RegionName="Region_Footer" VerticalAlignment="Bottom"/>

                <!-- anything over the game area must not be visible to hits -->
                <ItemsControl Regions:RegionManager.RegionName="OverlayRegion_Flyouts" VerticalAlignment="Center" HorizontalAlignment="Center"/>

                <!-- this is the mask which dims behind the menu system.. all but menu items should hide behind this mask -->
                <Rectangle x:Name="MenuBackgroundMask" Fill="Black" />
                
                <!-- this blocks out user input - used for AI mode-->
                <Grid x:Name="AIMaskingElement" Background="Transparent"/>

                <!-- menu regions / layers-->
                <ItemsControl Regions:RegionManager.RegionName="Region_Options" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                <ItemsControl Regions:RegionManager.RegionName="Region_HighScores" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                <ItemsControl Regions:RegionManager.RegionName="Region_AboutScreen" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                <ItemsControl Regions:RegionManager.RegionName="Region_TitleScreen" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                
            </Grid>
            
            <!-- TODO:: width/height should be bound to parents actual width/height -->
            <!-- TODO:: this mask is exactly as found in the SplashScreen.xaml (except bar is full), do we have to duplicate? -->
            <Grid x:Name="MaskingElement" Width="360" Height="430" Background="#414141" d:IsHidden="True">

                <Grid.RowDefinitions>
                    <RowDefinition Height="2*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="3*"/>
                </Grid.RowDefinitions>

                <StackPanel Grid.Row="1" VerticalAlignment="Center">
                    <StackPanel.Resources>
                        <LinearGradientBrush x:Key="LogoStrokeBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF555555"/>
                            <GradientStop Color="#FFFFFFFF" Offset="1"/>
                        </LinearGradientBrush>
                        <LinearGradientBrush x:Key="LogoFillBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF09155C" Offset="0"/>
                            <GradientStop Color="#FF0A1447" Offset="1"/>
                            <GradientStop Color="#FF2132A8" Offset="0.25200000405311584"/>
                        </LinearGradientBrush>
                    </StackPanel.Resources>

                    <Grid Width="252" Height="50" x:Name="Logo_Copy">
                        <Rectangle Fill="{StaticResource LogoFillBrush}" HorizontalAlignment="Left" Margin="0,0.004,0,0.996" Width="48" StrokeThickness="2">
                            <Rectangle.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF616161" Offset="0.352"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Stroke>
                        </Rectangle>
                        <Rectangle HorizontalAlignment="Left" Margin="45.741,16.001,0,0.999" Width="32" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2"/>
                        <Rectangle HorizontalAlignment="Left" Margin="87.746,16.001,0,0.999" Width="32" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2"/>
                        <Rectangle Margin="117.746,16.001,102.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2"/>
                        <Rectangle Margin="0,16.001,90.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="14.255"/>
                        <Rectangle Margin="0,16.001,60.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="32"/>
                        <Rectangle Margin="0,16.001,30.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="32"/>
                        <Rectangle Margin="0,16.001,0.254,0.999" Fill="{StaticResource LogoFillBrush}" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" HorizontalAlignment="Right" Width="32"/>
                        <Path HorizontalAlignment="Left" Margin="13.51,15.012,0,-0.012" Width="2" Fill="#FFFF0000" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M-55,4.0000024 L-55,28.003376"/>
                        <Path HorizontalAlignment="Left" Margin="29.51,15.012,0,-0.012" Width="2" Fill="#FFFF0000" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M-38.999996,28.000006 L-38.999996,4.0000024"/>
                        <Path Height="10" HorizontalAlignment="Left" Margin="61.022,0,0,0.047" VerticalAlignment="Bottom" Width="2" Fill="#FFFF0000" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M-14.999998,20.000004 L-14.999998,28.000006"/>
                        <Path HorizontalAlignment="Left" Margin="61.022,22.953,0,16.047" Width="2" Fill="#FFFF0000" Stretch="Fill" StrokeThickness="2" Data="M-14.999998,4.0000024 L-14.999998,12.000004">
                            <Path.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF5E5E5E"/>
                                    <GradientStop Color="#FFADADAD" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Stroke>
                        </Path>
                        <Path HorizontalAlignment="Left" Margin="69.745,0,0,1" Width="26" Fill="{StaticResource LogoFillBrush}" Stretch="Fill" StrokeThickness="2" Data="M6.9999986,1 L19,1 L19,6.9999981 L25,6.9999981 L25,16.999998 L18.999998,16.999998 L18.999998,46.999996 L6.9999981,46.999996 L6.9999981,16.999998 L1,16.999998 L1,6.9999981 L6.9999986,6.9999981 z" x:Name="T">
                            <Path.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF484848" Offset="0.373"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Stroke>
                        </Path>
                        <Path HorizontalAlignment="Left" Margin="101.746,23.001,0,7.999" Width="2" Fill="#FFFF0000" Stretch="Fill" StrokeThickness="2" Data="M25,4 L25,20">
                            <Path.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF7C7C7C"/>
                                    <GradientStop Color="#FFDBDBDB" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Stroke>
                        </Path>
                        <Path Height="2" HorizontalAlignment="Left" Margin="101.746,0,0,15.999" VerticalAlignment="Bottom" Width="18" Fill="#FFFF0000" Stretch="Fill" Stroke="#FF9DA3AE" StrokeThickness="2" Data="M41,12 L25,12"/>
                        <Path HorizontalAlignment="Right" Margin="0,15.001,117.254,19.999" Width="2" Fill="#FF94C7CE" Stretch="Fill" StrokeThickness="2" Data="M56.999996,-4 L56.999996,4">
                            <Path.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF5B5B5B"/>
                                    <GradientStop Color="#FF7B7B7B" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Stroke>
                        </Path>
                        <Path Height="13.945" HorizontalAlignment="Right" Margin="0,0,117.254,-0.001" VerticalAlignment="Bottom" Width="2" Fill="#FF94C7CE" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M56.999996,28 L56.999996,20"/>
                        <Rectangle Height="16" HorizontalAlignment="Right" Margin="0,0.001,90.254,0" VerticalAlignment="Top" Width="14.256" Fill="{StaticResource LogoFillBrush}" StrokeThickness="2">
                            <Rectangle.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF484848" Offset="0"/>
                                    <GradientStop Color="#FF9B9B9B" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Stroke>
                        </Rectangle>
                        <Path Height="18" HorizontalAlignment="Right" Margin="0,0,81.254,-0.001" VerticalAlignment="Bottom" Width="2" Fill="#FF3FAFBE" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M97,12 L97,28"/>
                        <Path HorizontalAlignment="Right" Margin="0,15.001,70.254,15.999" Width="2" Fill="#FF3FAFBE" Stretch="Fill" StrokeThickness="2" Data="M113,12 L113,-4">
                            <Path.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF595959"/>
                                    <GradientStop Color="#FFA9A9A9" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Stroke>
                        </Path>
                        <Path Height="10" HorizontalAlignment="Right" Margin="0,0,45.746,10.001" VerticalAlignment="Bottom" Width="2" Fill="#FF3FAFBE" Stretch="Fill" StrokeThickness="2" Data="M137,12 L137,20">
                            <Path.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF7F7F7F"/>
                                    <GradientStop Color="#FFB9B9B9" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Stroke>
                        </Path>
                        <Path Height="2" HorizontalAlignment="Right" Margin="0,0,29.746,18.001" VerticalAlignment="Bottom" Width="18.824" Fill="#FF3FAFBE" Stretch="Fill" Stroke="#FF9C9FA5" StrokeThickness="2" Data="M153,12 L136.17584,12"/>
                        <Path HorizontalAlignment="Right" Margin="0,23.001,15.254,7.999" Width="2" Fill="#FF3FAFBE" Stretch="Fill" Stroke="{StaticResource LogoStrokeBrush}" StrokeThickness="2" Data="M169,4 L169,20"/>
                        <Path Height="8.001" HorizontalAlignment="Right" Margin="0,0,42,10.999" VerticalAlignment="Bottom" Width="6.078" Fill="#FF3FAFBE" Stretch="Fill" Stroke="#FF9C9FA5" StrokeThickness="2" Data="M153,12 L136.17584,12"/>
                    </Grid>

                    <Grid HorizontalAlignment="Center">
                        <Rectangle x:Name="RectBorder"
                 Width="252" Height="7"
                 StrokeThickness="1"
                 Stroke="#FF696969"/>
                        <Rectangle x:Name="RectBar"
                 Margin="1"
                 Width="252" Height="5"
                 Fill="#FFC8C8C8"
                 HorizontalAlignment="Left" />
                    </Grid>

                </StackPanel>
            </Grid>
            
        </Grid>
    </Grid>
</UserControl>
